package week1;

/**
 * Created by cx on 17-9-12.
 */
public class TicketMaker {
    private int TicketMaker = 1000;
    public int getTicketMaker() {
        return TicketMaker++;
    }

    private static TicketMaker Number = new TicketMaker();

    public static TicketMaker getInstance() {
        return Number;
    }

}
class  Test{
    public static  void main (String args[]){
        for(int i=0;i<10;i++) {
            System.out.println(i + ":" +
            TicketMaker.getInstance().getTicketMaker());
        }
    }
}